package movee.domain.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 *
 *
 * @author movee
 */
@Getter
@AllArgsConstructor
public enum AppStatusCode {

    OK(0, "OK", "success", HttpStatus.OK),
    ACCESS_DENIED(1, "AccessDenied", "Access denied. ", HttpStatus.OK),
    INVALID_QUERY_PARAM(2, "InvalidQueryParam", "some http query parameter is invalid. ", HttpStatus.OK),
    INTERNAL_ERROR(3, "InternalError", "We encountered an internal error. Please contact maintain engineer. ",
            HttpStatus.OK),
    ABNORMAL_DEPENDENCY_SERVICE(4, "AbnormalDependencyService", "responses from dependency services is abnormal. ",
            HttpStatus.OK),
    INVALID_ACCESS_KEY_ID(5, "InvalidAccessKeyId", "The Access Key ID you provided does not exist" +
            " in our records. ", HttpStatus.OK),
    INVALID_HTTP_AUTH_HEADER(5, "InvalidHTTPAuthHeader", "The HTTP authorization header is invalid. " +
            "Consult the service documentation for details. ", HttpStatus.OK),
    INVALID_URI(6, "InvalidURI", "Could not parse the specified URI. ", HttpStatus.OK),
    INVALID_HTTP_REQUEST(7, "InvalidHTTPRequest", "There was an error in the body of your HTTP request. ",
            HttpStatus.OK),
    INAPPROPRIATE_JSON(8,  "InappropriateJSON", "The JSON you provided was well-formed and valid," +
            " but not appropriate for this operation. ", HttpStatus.OK),
    MALFORMED_JSON(9, "MalformedJSON", "The JSON you provided was not well-formed. ", HttpStatus.OK),
    INVALID_VERSION(10, "InvalidVersion", "The API version specified was invalid. ", HttpStatus.OK),
    OPT_IN_REQUIRED(11, "OptInRequired", "A subscription for the service is required. ", HttpStatus.OK),
    PRECONDITION_FAILED(12, "PreconditionFailed", "The specified If-Match header doesn't " +
            "match the ETag header. ", HttpStatus.OK),
    REQUEST_EXPIRED(13, "RequestExpired", "Request has expired", HttpStatus.OK),
    IDEMPOTENT_PARAMETER_MISMATH(14, "IdempotentParameterMismatch", "The request uses the same" +
            " client token as a previous, but non-identical request. ", HttpStatus.OK),
    SIGNATURE_NOT_MATCH(15, "SignatureDoesNotMatch", "The request signature we calculated " +
            "does not match the signature you provided. Check your Secret Access Key and signing method. " +
            "Consult the service documentation for details. ", HttpStatus.OK),
    RESOURCE_NOT_FOUND(16, "ResourceNotFound", "requested resource is not found. ",
            HttpStatus.OK),
    RATE_LIMITED(17, "RateLimited", "access frequency exceed the max permitted rate", HttpStatus.OK);

    // private final String code;
    private final Integer code;
    private final String phrase;
    private final String message;
    private final HttpStatus httpStatus;

}
